3.2.67 \(\int \frac {(1-a^2 x^2) \tanh ^{-1}(a x)}{x^2} \, dx\) [167]

Optimal. Leaf size=38 \[ -\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \log (x)-a \log \left (1-a^2 x^2\right ) \]

[Out]

-arctanh(a*x)/x-a^2*x*arctanh(a*x)+a*ln(x)-a*ln(-a^2*x^2+1)

________________________________________________________________________________________

Rubi [A]
time = 0.04, antiderivative size = 38, normalized size of antiderivative = 1.00, number of steps used = 8, number of rules used = 8, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.444, Rules used = {6161, 6037, 272, 36, 29, 31, 6021, 266} \begin {gather*} -a \log \left (1-a^2 x^2\right )+a^2 (-x) \tanh ^{-1}(a x)+a \log (x)-\frac {\tanh ^{-1}(a x)}{x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((1 - a^2*x^2)*ArcTanh[a*x])/x^2,x]

[Out]

-(ArcTanh[a*x]/x) - a^2*x*ArcTanh[a*x] + a*Log[x] - a*Log[1 - a^2*x^2]

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 266

Int[(x_)^(m_.)/((a_) + (b_.)*(x_)^(n_)), x_Symbol] :> Simp[Log[RemoveContent[a + b*x^n, x]]/(b*n), x] /; FreeQ
[{a, b, m, n}, x] && EqQ[m, n - 1]

Rule 272

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 6021

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.), x_Symbol] :> Simp[x*(a + b*ArcTanh[c*x^n])^p, x] - Dist[b
*c*n*p, Int[x^n*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))), x], x] /; FreeQ[{a, b, c, n}, x] && IGtQ[p
, 0] && (EqQ[n, 1] || EqQ[p, 1])

Rule 6037

Int[((a_.) + ArcTanh[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)*((a + b*ArcTanh[c*
x^n])^p/(m + 1)), x] - Dist[b*c*n*(p/(m + 1)), Int[x^(m + n)*((a + b*ArcTanh[c*x^n])^(p - 1)/(1 - c^2*x^(2*n))
), x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0] && (EqQ[p, 1] || (EqQ[n, 1] && IntegerQ[m])) && NeQ[m, -1
]

Rule 6161

Int[((a_.) + ArcTanh[(c_.)*(x_)]*(b_.))^(p_.)*((f_.)*(x_))^(m_)*((d_) + (e_.)*(x_)^2)^(q_.), x_Symbol] :> Dist
[d, Int[(f*x)^m*(d + e*x^2)^(q - 1)*(a + b*ArcTanh[c*x])^p, x], x] - Dist[c^2*(d/f^2), Int[(f*x)^(m + 2)*(d +
e*x^2)^(q - 1)*(a + b*ArcTanh[c*x])^p, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[c^2*d + e, 0] && GtQ[q
, 0] && IGtQ[p, 0] && (RationalQ[m] || (EqQ[p, 1] && IntegerQ[q]))

Rubi steps

\begin {align*} \int \frac {\left (1-a^2 x^2\right ) \tanh ^{-1}(a x)}{x^2} \, dx &=-\left (a^2 \int \tanh ^{-1}(a x) \, dx\right )+\int \frac {\tanh ^{-1}(a x)}{x^2} \, dx\\ &=-\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \int \frac {1}{x \left (1-a^2 x^2\right )} \, dx+a^3 \int \frac {x}{1-a^2 x^2} \, dx\\ &=-\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)-\frac {1}{2} a \log \left (1-a^2 x^2\right )+\frac {1}{2} a \text {Subst}\left (\int \frac {1}{x \left (1-a^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)-\frac {1}{2} a \log \left (1-a^2 x^2\right )+\frac {1}{2} a \text {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )+\frac {1}{2} a^3 \text {Subst}\left (\int \frac {1}{1-a^2 x} \, dx,x,x^2\right )\\ &=-\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \log (x)-a \log \left (1-a^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.01, size = 38, normalized size = 1.00 \begin {gather*} -\frac {\tanh ^{-1}(a x)}{x}-a^2 x \tanh ^{-1}(a x)+a \log (x)-a \log \left (1-a^2 x^2\right ) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((1 - a^2*x^2)*ArcTanh[a*x])/x^2,x]

[Out]

-(ArcTanh[a*x]/x) - a^2*x*ArcTanh[a*x] + a*Log[x] - a*Log[1 - a^2*x^2]

________________________________________________________________________________________

Maple [A]
time = 0.12, size = 44, normalized size = 1.16

method result size
derivativedivides \(a \left (-a x \arctanh \left (a x \right )-\frac {\arctanh \left (a x \right )}{a x}-\ln \left (a x -1\right )+\ln \left (a x \right )-\ln \left (a x +1\right )\right )\) \(44\)
default \(a \left (-a x \arctanh \left (a x \right )-\frac {\arctanh \left (a x \right )}{a x}-\ln \left (a x -1\right )+\ln \left (a x \right )-\ln \left (a x +1\right )\right )\) \(44\)
risch \(-\frac {\left (a^{2} x^{2}+1\right ) \ln \left (a x +1\right )}{2 x}+\frac {x^{2} \ln \left (-a x +1\right ) a^{2}+2 a \ln \left (x \right ) x -2 a \ln \left (a^{2} x^{2}-1\right ) x +\ln \left (-a x +1\right )}{2 x}\) \(69\)
meijerg \(\frac {a \left (\frac {2 \ln \left (1-\sqrt {a^{2} x^{2}}\right )-2 \ln \left (1+\sqrt {a^{2} x^{2}}\right )}{\sqrt {a^{2} x^{2}}}-2 \ln \left (-a^{2} x^{2}+1\right )+4 \ln \left (x \right )+4 \ln \left (i a \right )\right )}{4}+\frac {a \left (\frac {2 a^{2} x^{2} \left (\ln \left (1-\sqrt {a^{2} x^{2}}\right )-\ln \left (1+\sqrt {a^{2} x^{2}}\right )\right )}{\sqrt {a^{2} x^{2}}}-2 \ln \left (-a^{2} x^{2}+1\right )\right )}{4}\) \(133\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((-a^2*x^2+1)*arctanh(a*x)/x^2,x,method=_RETURNVERBOSE)

[Out]

a*(-a*x*arctanh(a*x)-arctanh(a*x)/a/x-ln(a*x-1)+ln(a*x)-ln(a*x+1))

________________________________________________________________________________________

Maxima [A]
time = 0.26, size = 36, normalized size = 0.95 \begin {gather*} -a {\left (\log \left (a x + 1\right ) + \log \left (a x - 1\right ) - \log \left (x\right )\right )} - {\left (a^{2} x + \frac {1}{x}\right )} \operatorname {artanh}\left (a x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)*arctanh(a*x)/x^2,x, algorithm="maxima")

[Out]

-a*(log(a*x + 1) + log(a*x - 1) - log(x)) - (a^2*x + 1/x)*arctanh(a*x)

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 51, normalized size = 1.34 \begin {gather*} -\frac {2 \, a x \log \left (a^{2} x^{2} - 1\right ) - 2 \, a x \log \left (x\right ) + {\left (a^{2} x^{2} + 1\right )} \log \left (-\frac {a x + 1}{a x - 1}\right )}{2 \, x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)*arctanh(a*x)/x^2,x, algorithm="fricas")

[Out]

-1/2*(2*a*x*log(a^2*x^2 - 1) - 2*a*x*log(x) + (a^2*x^2 + 1)*log(-(a*x + 1)/(a*x - 1)))/x

________________________________________________________________________________________

Sympy [A]
time = 0.41, size = 41, normalized size = 1.08 \begin {gather*} \begin {cases} - a^{2} x \operatorname {atanh}{\left (a x \right )} + a \log {\left (x \right )} - 2 a \log {\left (x - \frac {1}{a} \right )} - 2 a \operatorname {atanh}{\left (a x \right )} - \frac {\operatorname {atanh}{\left (a x \right )}}{x} & \text {for}\: a \neq 0 \\0 & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a**2*x**2+1)*atanh(a*x)/x**2,x)

[Out]

Piecewise((-a**2*x*atanh(a*x) + a*log(x) - 2*a*log(x - 1/a) - 2*a*atanh(a*x) - atanh(a*x)/x, Ne(a, 0)), (0, Tr
ue))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 145 vs. \(2 (38) = 76\).
time = 0.39, size = 145, normalized size = 3.82 \begin {gather*} -a {\left (\frac {2 \, \log \left (-\frac {\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} + 1}{\frac {a {\left (\frac {a x + 1}{a x - 1} + 1\right )}}{\frac {{\left (a x + 1\right )} a}{a x - 1} - a} - 1}\right )}{\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 1} + \log \left (\frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}}\right ) - \log \left ({\left | \frac {{\left (a x + 1\right )}^{2}}{{\left (a x - 1\right )}^{2}} - 1 \right |}\right )\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((-a^2*x^2+1)*arctanh(a*x)/x^2,x, algorithm="giac")

[Out]

-a*(2*log(-(a*((a*x + 1)/(a*x - 1) + 1)/((a*x + 1)*a/(a*x - 1) - a) + 1)/(a*((a*x + 1)/(a*x - 1) + 1)/((a*x +
1)*a/(a*x - 1) - a) - 1))/((a*x + 1)^2/(a*x - 1)^2 - 1) + log((a*x + 1)^2/(a*x - 1)^2) - log(abs((a*x + 1)^2/(
a*x - 1)^2 - 1)))

________________________________________________________________________________________

Mupad [B]
time = 0.81, size = 37, normalized size = 0.97 \begin {gather*} a\,\ln \left (x\right )-a\,\ln \left (a^2\,x^2-1\right )-\frac {\mathrm {atanh}\left (a\,x\right )}{x}-a^2\,x\,\mathrm {atanh}\left (a\,x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(-(atanh(a*x)*(a^2*x^2 - 1))/x^2,x)

[Out]

a*log(x) - a*log(a^2*x^2 - 1) - atanh(a*x)/x - a^2*x*atanh(a*x)

________________________________________________________________________________________